package fun.boomcat.luckyhe.mirai.plugin.botcontrol.util;

/**
 * @author Lucky_He
 * @date 2021年9月8日 14:25
 * @description CurrentChattingUtil
 */
public class CurrentChattingUtil {
    private static long qq = 0;
    private static long groupId = 0;

    public static CurrentChattingType getType() {
        if (qq == 0L) {
            if (groupId == 0L) {
                return CurrentChattingType.NONE;
            } else {
                return CurrentChattingType.GROUP;
            }
        } else {
            if (groupId == 0L) {
                return CurrentChattingType.FRIEND;
            } else {
                return CurrentChattingType.TEMP;
            }
        }
    }

    public static void set(long q, long gId) {
        qq = q;
        groupId = gId;
    }

    public static void reset() {
        qq = 0L;
        groupId = 0L;
    }

    public static long getQq() {
        return qq;
    }

    public static long getGroupId() {
        return groupId;
    }
}
